<template>
  <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
    <van-swipe-item v-for="(item, index) in banners" :key="index"><img v-lazy="item.img_url" :alt="item.title" /></van-swipe-item>
  </van-swipe>
</template>

<script>
export default {
  name: "HomeSwiper",
  props: {
    banners: Array,
    default() {
      return []
    }
  }
}
</script>

<style scoped lang="scss">
.my-swipe .van-swipe-item {
  height: auto;
  max-height: 150px;
}
</style>